//
//  ViewController.m
//  color changer 2
//
//  Created by iD Student on 7/8/13.
//  Copyright (c) 2013 iD Student. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(IBAction) changeBackgroundColor:(id)sender
{
    UIButton *buttonPressed= (UIButton*)sender;
    
    if(buttonPressed==redButton)
    {
        [self.view setBackgroundColor:[UIColor orangeColor]];
        colorLabel.text=@"Purple";
    }
    else if (buttonPressed == orangeButton)
    {
        [self.view setBackgroundColor:[UIColor redColor]];
        colorLabel.text=@"Green";
    }
}

@end
